﻿namespace MF_Base
{
    using EFBase;
    using MF_Base.Model;
    using System;
    using System.Collections.Generic;
    using System.Data.Entity.Migrations;
    using System.Data.Entity.ModelConfiguration.Conventions;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    internal sealed class Configuration : DbMigrationsConfiguration<BaseDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            AutomaticMigrationDataLossAllowed = true;
            //SetHistoryContextFactory("System.Data.SqlClient", (connection, defaultSchema) => new MyHistoryContext(connection, defaultSchema));
        }

        protected override void Seed(BaseDbContext context)
        {
            //MF_User加入管理员
            string userSql = @"INSERT [dbo].[MF_User] ([Id], [LoginName], [PassWord], [Code], [RealName], [Sex], [Age], [Birthday], [Enabled], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime], [MF_DepartmentId]) 
                             VALUES 
                             (N'aa0200ea-6b02-43d3-96ff-86a5516646f8', N'admin', N'202cb962ac59075b964b07152d234b70', N'admin', N'管理员', N'Male', 0, CAST(0x0000AA1100000000 AS DateTime), 0, N'', N'', N'aa0200ea-6b02-43d3-96ff-86a5516646f8', N'管理员', 3, CAST(0x0000AA0200EA6A8C AS DateTime), CAST(0x0000AA1A014D9DEC AS DateTime), null)";
            if (context.Set<MF_User>().Count() == 0)
                context.ExcuteSql(userSql);

            //MF_Func加入菜单
            string funcSql = @"INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'1aaaaa', NULL, N'1aaaaa', N'平台管理', N'', N'iconfont iconfont-shezhi', N'Module', N'', NULL, NULL, NULL, NULL, 3, CAST(0x0000A6D400000000 AS DateTime), CAST(0x0000AB3100C584EF AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'1aaaaa', N'1aaaaa.ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'系统管理', N'', N'iconfont iconfont-shezhi1', N'Menu', N'', NULL, NULL, NULL, NULL, 103, CAST(0x0000AB3100C0D29A AS DateTime), CAST(0x0000AB3100C5E433 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-1b06-428c-b89e-6dce8876857f', N'1aaaaa', N'1aaaaa.ab3100c1-1b06-428c-b89e-6dce8876857f', N'组织管理', N'', N'iconfont iconfont-haoyou', N'Menu', N'', NULL, NULL, NULL, NULL, 130, CAST(0x0000AB3100C11B05 AS DateTime), CAST(0x0000AB3100C6031F AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752', N'系统定义', N'', N'iconfont iconfont-yingyong', N'Menu', N'', NULL, NULL, NULL, NULL, 131, CAST(0x0000A99B01161751 AS DateTime), CAST(0x0000AB3100C623F3 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'a9cc0163-ccf5-4705-a426-aa9862c4d92b', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.a9cc0163-ccf5-4705-a426-aa9862c4d92b', N'表单定义', N'/AutoUI/ConfigUIDef/Form/List', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 104, CAST(0x0000A9CC0163CCF6 AS DateTime), CAST(0x0000AA3801721885 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'a9cc0163-d1ac-4ca1-8439-19e58dea0b1a', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.a9cc0163-d1ac-4ca1-8439-19e58dea0b1a', N'列表定义', N'/AutoUI/ConfigUIDef/List/List', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 105, CAST(0x0000A9CC0163D1AA AS DateTime), CAST(0x0000AA3801745226 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'a9d6011d-6633-4bae-9d31-f50cdb47bf41', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.a9d6011d-6633-4bae-9d31-f50cdb47bf41', N'流程设计', N'/WorkFlow/WFDef/FLowGraph', N'icon icon-develop', N'Menu', N'', NULL, NULL, NULL, NULL, 107, CAST(0x0000A9D6011D6640 AS DateTime), CAST(0x0000A9E601020AB3 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'a9dc0170-4b57-4102-a137-44f976959f39', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.a9dc0170-4b57-4102-a137-44f976959f39', N'流程定义', N'/WorkFlow/WFDef/List', N'icon icon-develop', N'Menu', N'', NULL, NULL, NULL, NULL, 108, CAST(0x0000A9DC01704B5B AS DateTime), CAST(0x0000A9E10109F8B3 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'a9e10103-7e0d-455b-9878-9d4403542162', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.a9e10103-7e0d-455b-9878-9d4403542162', N'数据源定义', N'/AutoUI/Sys/SQLDataSource/PageView', N'icon icon-develop', N'Menu', N'', NULL, NULL, NULL, NULL, 109, CAST(0x0000A9E101037E18 AS DateTime), CAST(0x0000AA8100DF2DA3 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'aa8d017e-244b-4407-a76e-292f9dd6f9ad', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.aa8d017e-244b-4407-a76e-292f9dd6f9ad', N'枚举定义', N'/AutoUI/Sys/Enum/List', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 110, CAST(0x0000AA8D017E2449 AS DateTime), CAST(0x0000AA8D017E693A AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab220124-b7ae-4285-85f1-e64e19129c2f', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'1aaaaa.e8bf79ea-14bd-483d-bb63-a99b01161752.ab220124-b7ae-4285-85f1-e64e19129c2f', N'主页面板配置', N'/AutoUI/Sys/DefineHome/PageView', N'icon icon-develop', N'Menu', N'', NULL, NULL, NULL, NULL, 128, CAST(0x0000AB220124B7AD AS DateTime), CAST(0x0000AB220124CD86 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-5641-4799-8f1f-e237c7e5946f', N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'1aaaaa.ab3100c0-d29b-4b5b-9fe4-f54b11077115.ab3100c1-5641-4799-8f1f-e237c7e5946f', N'用户管理', N'/AutoUI/Sys/MFUser/PageView', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 133, CAST(0x0000AB3100C15641 AS DateTime), CAST(0x0000ABCB01218FAC AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-5722-4c06-8b4f-64d3c20d417e', N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'1aaaaa.ab3100c0-d29b-4b5b-9fe4-f54b11077115.ab3100c1-5722-4c06-8b4f-64d3c20d417e', N'系统角色', N'/AutoUI/Sys/MFRole/List?RoleType=Sys', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 134, CAST(0x0000AB3100C15722 AS DateTime), CAST(0x0000AB3100C23F98 AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-57db-44b7-9c82-784d0a37db34', N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'1aaaaa.ab3100c0-d29b-4b5b-9fe4-f54b11077115.ab3100c1-57db-44b7-9c82-784d0a37db34', N'角色权限', N'/AutoUI/Sys/FuncManage/RoleFunc', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 137, CAST(0x0000AB3100C157DA AS DateTime), CAST(0x0000AB3100C2464F AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-8268-46c8-aa68-1a44daafd764', N'ab3100c1-1b06-428c-b89e-6dce8876857f', N'1aaaaa.ab3100c1-1b06-428c-b89e-6dce8876857f.ab3100c1-8268-46c8-aa68-1a44daafd764', N'组织角色', N'/AutoUI/Sys/MFRole/List?RoleType=Org', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 135, CAST(0x0000AB3100C18267 AS DateTime), CAST(0x0000AB3100C25DED AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c1-8574-415c-aabb-dcf22324ab81', N'ab3100c1-1b06-428c-b89e-6dce8876857f', N'1aaaaa.ab3100c1-1b06-428c-b89e-6dce8876857f.ab3100c1-8574-415c-aabb-dcf22324ab81', N'部门管理', N'/AutoUI/Sys/MFDepartment/List', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 136, CAST(0x0000AB3100C18574 AS DateTime), CAST(0x0000AB3100C2677D AS DateTime))
INSERT [dbo].[MF_Func] ([Id], [ParentId], [FullId], [Text], [Url], [IconCls], [EnumFuncType], [Remark], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c5-1b4c-4fd5-a3a0-3e84b59dbadb', N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'1aaaaa.ab3100c0-d29b-4b5b-9fe4-f54b11077115.ab3100c5-1b4c-4fd5-a3a0-3e84b59dbadb', N'菜单管理', N'/AutoUI/Sys/FuncManage/List', N'', N'Menu', N'', NULL, NULL, NULL, NULL, 132, CAST(0x0000AB3100C51B4C AS DateTime), CAST(0x0000AB3100C52399 AS DateTime))";

            if (context.Set<MF_Func>().Count() == 0)
                context.ExcuteSql(funcSql);

            //MF_Role加入角色
            string roleSql = @"INSERT [dbo].[MF_Role] ([Id], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime], [Code], [Name], [Remark], [EnumRoleType]) VALUES (N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 3, CAST(0x0000AA020121A1E6 AS DateTime), CAST(0x0000AA020123F159 AS DateTime), N'admin', N'系统管理员', N'', N'Sys')";
            if (context.Set<MF_Role>().Count() == 0)
                context.ExcuteSql(roleSql);

            //MF_RoleUser人员角色映射
            string roleUserSql = @"INSERT [dbo].[MF_RoleUser] ([Id], [MF_UserId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'aa040104-86c9-424f-84d1-f842abd17bc5', N'aa0200ea-6b02-43d3-96ff-86a5516646f8', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 2, CAST(0x0000AA04010486CC AS DateTime), CAST(0x0000AA04010486D0 AS DateTime))";
            if (context.Set<MF_RoleUser>().Count() == 0)
                context.ExcuteSql(roleUserSql);

            //MF_FuncRole角色菜单映射
            string funcRoleSql = @"
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c7e-419d-ad92-0f6df10098bc', N'1aaaaa', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C7D AS DateTime), CAST(0x0000AB3100C29C7D AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c7f-46d4-b1d6-720a29d3fb5a', N'a9cc0163-ccf5-4705-a426-aa9862c4d92b', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C7F AS DateTime), CAST(0x0000AB3100C29C7F AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c81-4036-b6e5-ae4a2841a52f', N'a9d6011d-6633-4bae-9d31-f50cdb47bf41', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C81 AS DateTime), CAST(0x0000AB3100C29C81 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c81-4c6d-aec9-849060df04b6', N'a9cc0163-d1ac-4ca1-8439-19e58dea0b1a', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C80 AS DateTime), CAST(0x0000AB3100C29C80 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c82-4aeb-b75b-76a6213082c9', N'a9dc0170-4b57-4102-a137-44f976959f39', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C81 AS DateTime), CAST(0x0000AB3100C29C81 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c82-4cc5-9aed-242be4c8c22f', N'a9e10103-7e0d-455b-9878-9d4403542162', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C82 AS DateTime), CAST(0x0000AB3100C29C82 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c83-4f31-8f65-5e11bf8270c5', N'aa8d017e-244b-4407-a76e-292f9dd6f9ad', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C82 AS DateTime), CAST(0x0000AB3100C29C82 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c84-459c-b2e4-2b2e64763342', N'ab3100c0-d29b-4b5b-9fe4-f54b11077115', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C84 AS DateTime), CAST(0x0000AB3100C29C84 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c84-49b5-849c-ada26f0faef6', N'ab220124-b7ae-4285-85f1-e64e19129c2f', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C83 AS DateTime), CAST(0x0000AB3100C29C83 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c85-47ce-b179-fc36007c67e3', N'ab3100c1-1b06-428c-b89e-6dce8876857f', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C84 AS DateTime), CAST(0x0000AB3100C29C84 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c86-435e-ae14-f9fb9a71ecac', N'ab3100c1-57db-44b7-9c82-784d0a37db34', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C86 AS DateTime), CAST(0x0000AB3100C29C86 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c86-47a4-8850-b0f3be47c152', N'ab3100c1-5722-4c06-8b4f-64d3c20d417e', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C85 AS DateTime), CAST(0x0000AB3100C29C85 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c86-4c8a-8aaf-f68aa7964d88', N'ab3100c1-5641-4799-8f1f-e237c7e5946f', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C85 AS DateTime), CAST(0x0000AB3100C29C85 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c87-4080-83a7-d7fb0dc66e9a', N'ab3100c1-8268-46c8-aa68-1a44daafd764', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C86 AS DateTime), CAST(0x0000AB3100C29C86 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c88-44f9-a2d5-28151d4244d4', N'e8bf79ea-14bd-483d-bb63-a99b01161752', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C87 AS DateTime), CAST(0x0000AB3100C29C87 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c88-4cb9-b58a-997356d47601', N'ab3100c1-8574-415c-aabb-dcf22324ab81', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C87 AS DateTime), CAST(0x0000AB3100C29C87 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c2-9c89-477d-a40c-bde0a29d8563', N'1aaaaa', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 29, CAST(0x0000AB3100C29C88 AS DateTime), CAST(0x0000AB3100C29C88 AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c5-381b-477c-8b48-833b900ea647', N'ab3100c5-1b4c-4fd5-a3a0-3e84b59dbadb', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 30, CAST(0x0000AB3100C5381B AS DateTime), CAST(0x0000AB3100C5381B AS DateTime))
INSERT [dbo].[MF_FuncRole] ([Id], [MF_FuncId], [MF_RoleId], [CreateUserID], [CreateUserName], [ModifyUserID], [ModifyUserName], [OrderIndex], [CreateTime], [ModifyTime]) VALUES (N'ab3100c5-381c-4212-8c74-ad61b0f43658', N'ab3100c5-1b4c-4fd5-a3a0-3e84b59dbadb', N'aa020121-9de2-4212-bc79-f97ce6f8f2a9', NULL, NULL, NULL, NULL, 30, CAST(0x0000AB3100C5381C AS DateTime), CAST(0x0000AB3100C5381C AS DateTime))";

            if (context.Set<MF_FuncRole>().Count() == 0)
                context.ExcuteSql(funcRoleSql);
        }
    }
}
